<template>
  <div>
    <el-submenu v-for="(menu,index) in menusData" :index="menu.menuId.toString()" v-if="menu.menuType == 0" :key="menu.menusId">
  	<template slot="title">
  	  <i :class="menu.menuIcon"></i>
  	  <span>{{menu.menuName}}</span>
  	</template>
  	<menusCompent :menusData="menu.children">

    </menusCompent>
    </el-submenu>
    <el-menu-item v-for="(menu,index) in menusData" :index="menu.menuId.toString()" v-if="menu.menuType == 1" :key="menu.menuId" >
  	<i :class="menu.menuIcon"></i>
  	<span><a :href="menu.menuRouter">{{menu.menuName}}</a></span>
    </el-menu-item>
  </div>
</template>

<script>
  export default {
    name: 'menusCompent',
    props:['menusData']
  }
</script>

<style>
</style>
